package threadPr;

import java.util.logging.Level;
import java.util.logging.Logger;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Administrator
 */
public class TH1 implements Runnable{
int i;
static int total=0;
    public void run() {

        System.out.println("Running by"+Thread.currentThread().getName());
        for(i=0;i<1000;i++)
        {
            /*try {
            Thread.sleep(500);
            } catch (InterruptedException ex) {
            System.err.println(ex);
            }*/
             total++;
            System.out.println(" i="+i+Thread.currentThread().getName());
        }
       
    }
    //synchronized public void countTotal()
    //{
       
    //}


}
